import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

/* Component Imports */
import { HomeComponent } from './module/home/home.component';
import { myProjectComponent } from './module/my_project/myProject.component';
import { AboutComponent } from './module/about/about.component';
import { bindPublicNumberComponent } from './module/bind_public_number/bindPublicNumber.component';
import { NotFoundComponent } from './module/error/notfound.component';
import { LoginComponent } from './module/login/login.component';
import { RegisterComponent } from './module/register/register.component';
import { editGameComponent } from './module/edit_game/editGame.compoent';
import { GameDetailsComponent } from './module/game_details/game_details.component';
import { ForgotComponent } from './module/forgot_password/forgot.component';
import { viewDataComponent } from './module/view_data/viewData.compoent';
import { UserCenterComponent } from './module/user_center/userCenter.component';
import { userRechargeComponent } from './module/user_recharge/userRecharge.compoent';
import { GameViewComponent } from './module/game_view/gameView.component';
import { GamePViewComponent } from './module/game_project_view/gamePView.component';
/* Route List */
const appRoutes: Routes = [
    {
        path: 'home', // 主页
        component: HomeComponent
    },
    {
        path: 'my_project', // 我的项目
        component: myProjectComponent
    },
    {
        path: 'game_details/:id', // 游戏详情
        component: GameDetailsComponent
    },
    {
        path: 'about', // 关于页面
        component: AboutComponent
    },
    {
        path: 'user_recharge', // 用户充值页面
        component: userRechargeComponent
    },
    {
        path: 'bind_public_number', // 公共账号页面
        component: bindPublicNumberComponent
    },
    {
        path: 'user_center', // 个人信息页面
        component: UserCenterComponent
    },
    {
        path: 'login', // 登录页面
        component: LoginComponent
    },
    {
        path: 'forgot', // 修改密码页面
        component: ForgotComponent
    },
    {
        path: 'game_view/:id', // 预览游戏页面
        component: GameViewComponent
    },
    {
        path: 'game_p_view/:id', // 预览游戏页面
        component: GamePViewComponent
    },
    {
        path: 'view_data/:id', // 查看数据页面
        component: viewDataComponent
    },
    {
        path: 'register', // 注册页面
        component: RegisterComponent
    },
    {
        path: 'edit_game/:id', // 编辑游戏
        component: editGameComponent
    },
    {
        path: '', // 默认页面
        component: HomeComponent
    },
    {
        path: '**', // 404 页面
        component: NotFoundComponent
    }
];

@NgModule({
    imports: [
        RouterModule.forRoot(appRoutes)
    ],
    exports: [
        RouterModule
    ]
})
export class AppRouting { }